package com.aya.mapper.model;

import org.apache.log4j.Logger;
import org.springframework.core.io.Resource;

import java.util.Arrays;

public class ChildBean {

    @javax.annotation.Resource
    MyDispose myDispose;
    private Resource[] resources;

    public MyDispose getMyDispose() {
        return myDispose;
    }

    public void setMyDispose(MyDispose myDispose) {
        this.myDispose = myDispose;
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void send() {
        System.out.println("ChildBean send message");
    }

    Logger logger = Logger.getLogger(getClass());

    public void setPath(Resource[] resources) {
        this.resources = resources;
        logger.info("inject bean with MyDispose");
    }


    @Override
    public String toString() {
        return "ChildBean{" +
                "myDispose=" + myDispose +
                ", resources=" + Arrays.toString(resources) +
                ", name='" + name + '\'' +
                '}';
    }
}
